'use strict';

export default class extends think.controller.base {
	async __before(ctrl) {
		//部分 action 下不检查
		let blankActions = ['login', 'signin'];
		if (blankActions.indexOf(ctrl.http.action) >= 0) {
			return;
		}
		let userInfo = await ctrl.session('userInfo');
		//判断 session 里的 userInfo
		if (think.isEmpty(userInfo)) {
			//return ctrl.redirect('/user/login');
		}
	}

	__call(ctrl) {
		console.log('not found ctrl, use _call');
		return ctrl.display();
	}
}